package com.sync.data.mce.repository;


import com.sync.data.ievent.entity.IeventBaseEmployee;
import com.sync.data.mce.entity.MceBaseEmployee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MceBaseEmployeeRepository extends JpaRepository<MceBaseEmployee, String>, JpaSpecificationExecutor<MceBaseEmployee> {

    /**
     * 通过employeeCode获取员工主数据
     * @param employeeCodes 员工编号
     * @param isActive 是否生效
     * @return List<BaseEmployee>
     */
    List<MceBaseEmployee> findByEmployeeCodeInAndIsActive(List<String> employeeCodes, Integer isActive);

    /**
     * 通过employeeCode获取员工主数据
     * @param employeeCodes 员工编号
     * @return List<BaseEmployee>
     */
    List<MceBaseEmployee> findByEmployeeCodeIn(List<String> employeeCodes);

    /**
     * by编号获取员工
     * @param employeeCode 员工编号
     * @return BaseEmployee
     */
    MceBaseEmployee findByEmployeeCode(String employeeCode);
}
